package com.fingard.dsp.bank.reqrespobj.billpool;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.billpool.Detail.RetAtsB331DiscountApplicationDetail;
import com.fingard.xml.XmlTextWriter;

public class RetAtsB331DiscountApplication extends RetAtsBase {
    public String RespInfo;
    public String RespCode;

    public RetAtsB331DiscountApplication(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }

    public void writeRetAtsXml(RetAtsB331DiscountApplication B331) {
        retXmlWriter.writeElementString("RespCode", B331.RespCode);
        retXmlWriter.writeElementString("RespInfo", B331.RespInfo);
        writeEnd();
    }

    public void wirteRetDetail(RetAtsB331DiscountApplicationDetail detail) {
        retXmlWriter.writeStartElement("DetailRecord");
        retXmlWriter.writeElementString("TransState", detail.TransState);
        retXmlWriter.writeElementString("PayInfoCode", detail.PayInfoCode);
        retXmlWriter.writeElementString("ReqSeqID", detail.ReqSeqID);
        retXmlWriter.writeElementString("AccountNum", detail.AccountNum);
        retXmlWriter.writeEndElement();
    }
}
